import { request } from '@/utils/request';
import type { PaymentOrder } from '@/api/model/orderModel';
import {PageData} from '@/api/model/pageModel'

const Api = {
  BaseList: '/trade/order',
  CardList: '/get-card-list',
};

export function getList(pageInfo:any) {
  if(pageInfo.startDate&&pageInfo.endDate){
    return request.get<PageData<PaymentOrder>>({
        url: Api.BaseList+"?page="+pageInfo.current+"&pageSize="+pageInfo.pageSize+"&startDate="+pageInfo.startDate+"&endDate="+pageInfo.endDate,
      });
  }else
  {
    return request.get<PageData<PaymentOrder>>({
        url: Api.BaseList+"?page="+pageInfo.current+"&pageSize="+pageInfo.pageSize,
      });
  }
  
}

